<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
 */

Route::group([
    'namespace' => 'Api',
    'middleware' => ['api.log'],
], function ($router) {
    $router->post('/config/banner_list', 'ConfigController@app_banner')->name('api.config.app_banner');
    $router->post('/config/about_us', 'ConfigController@about_us')->name('api.config.about_us');
    $router->post('/config/kefu', 'ConfigController@kefu')->name('api.config.kefu');

    $router->post('upload_img', 'CommonController@upload_img')->name('api.CommonController.upload_img'); //上传图片
    $router->post('get_labels', 'CommonController@get_labels')->name('api.CommonController.get_labels'); //获取标签
    $router->post('iosCode', 'CommonController@iosCode')->name('api.CommonController.iosCode'); //查询物流信息
    $router->post('onlineShopUrl', 'CommonController@onlineShopUrl')->name('api.CommonController.onlineShopUrl'); //查询物流信息
    $router->post('get_image_code', 'CommonController@get_image_code')->name('api.CommonController.get_image_code');
    $router->post('sendByGraph', 'CommonController@sendByGraph')->name('api.CommonController.sendByGraph'); //发送验证码
    $router->post('sendByRegister', 'CommonController@sendByRegister')->name('api.CommonController.sendByRegister'); //发送验证码


    $router->post('quickLogin', 'AuthenticateController@quickLogin')->name('api.authorizations.quickLogin');
    $router->post('login', 'AuthenticateController@login')->name('api.authorizations.login');
    $router->post('register', 'AuthenticateController@register')->name('api.authorization.register');
    $router->post('smsCode', 'AuthenticateController@smsCode')->name('api.authorization.smsCode');
    $router->post('verifySmsCode', 'AuthenticateController@verifySmsCode')->name('api.authorization.verifySmsCode');
    $router->post('createCodeImage', 'AuthenticateController@createCodeImage')->name('api.authorization.createCodeImage');
    $router->post('verifyCodeImage', 'AuthenticateController@verifyCodeImage')->name('api.authorization.verifyCodeImage');
    $router->post('forgetPassword', 'AuthenticateController@forgetPassword')->name('api.authorization.forgetPassword');
    $router->post('getRefreshToken', 'AuthenticateController@getRefreshToken')->name('api.authorization.getRefreshToken');
    $router->post('checkAccessToken', 'AuthenticateController@checkAccessToken')->name('api.authorization.checkAccessToken');
    

    $router->post('{social_type}/socialStore', 'SocialController@socialStore')->name('api.social.socialStore'); //第三方登录
    $router->post('wechat_register', 'SocialController@wechat_register')->name('api.SocialController.wechat_register');
    $router->post('bindPhoneFirst', 'SocialController@bindPhoneFirst')->name('api.SocialController.bindPhoneFirst');
    $router->post('bindPhoneSecond', 'SocialController@bindPhoneSecond')->name('api.SocialController.bindPhoneSecond');

    $router->post('Shop/crowdFundingFinished', 'ShopController@crowdFundingFinished')->name('api.Shop.crowdFundingFinished');
    $router->post('Shop/crowdFundingList', 'ShopController@crowdFundingList')->name('api.Shop.crowdFundingList');
    $router->post('Shop/crowdList', 'ShopController@crowdList')->name('api.Shop.crowdList');
    $router->post('Shop/index', 'ShopController@index')->name('api.Shop.index');

    $router->post('rentcloth/rentcloth_post_list', 'RentClothController@rentcloth_post_list')->name('api.RentCloth.rentcloth_post_list'); //晒单列表
    $router->post('rentcloth/rentcloth_post_detail_list', 'RentClothController@rentcloth_post_detail_list')->name('api.RentCloth.rentcloth_post_detail_list'); //所有晒单列表

    $router->post('index/test', 'IndexController@test')->name('api.index.test');

    $router->post('Shop/eve', 'ShopController@eve')->name('api.Shop.eve');

    $router->post('verify_code_image', 'AuthenticateController@verify_code_image')->name('api.authorization.verify_code_image');
    $router->post('sms_for_quick', 'AuthenticateController@sms_for_quick')->name('api.authorization.sms_for_quick');
    $router->post('quickLoginNew', 'AuthenticateController@quickLoginNew')->name('api.authorization.quickLoginNew');
    $router->post('appUpdate', 'CommonController@appUpdate')->name('api.CommonController.appUpdate'); //发送验证码
    $router->post('share/shopDetail', 'ShareController@shopDetail')->name('api.share.shopDetail');
    $router->post('share/shopRoleDetail', 'ShareController@shopRoleDetail')->name('api.share.shopRoleDetail');
    $router->post('share/rentclothPostDetail', 'ShareController@rentclothPostDetail')->name('api.share.rentclothPostDetail');

    //需要登陆
    $router->group(['middleware' => 'auth.api'], function ($router) {
        $router->post('get_labels', 'CommonController@get_labels')->name('api.CommonController.get_labels'); //获取标签
        $router->post('customer', 'CommonController@customer')->name('api.CommonController.customer'); //获取标签
        $router->post('getExpressInfo', 'CommonController@getExpressInfo')->name('api.CommonController.getExpressInfo'); //查询物流信息
        $router->post('sendByToken', 'CommonController@sendByToken')->name('api.CommonController.sendByToken'); //发送验证码

        $router->post('forgetSecurityCheckSms', 'AuthenticateController@forgetSecurityCheckSms')->name('api.authorization.forgetSecurityCheckSms');
        $router->post('forgetSecurity', 'AuthenticateController@forgetSecurity')->name('api.authorization.forgetSecurity');
        $router->post('checkSecurity', 'AuthenticateController@checkSecurity')->name('api.authorization.checkSecurity');
        $router->post('checkPhone', 'AuthenticateController@checkPhone')->name('api.authorization.checkPhone');
        $router->post('bindNewPhone', 'AuthenticateController@bindNewPhone')->name('api.authorization.bindNewPhone');
        $router->post('setPassword', 'AuthenticateController@setPassword')->name('api.authorization.setPassword');
        $router->post('setPayPassword', 'AuthenticateController@setPayPassword')->name('api.authorization.setPayPassword');
        $router->post('resetPassword', 'AuthenticateController@resetPassword')->name('api.authorization.resetPassword');
        $router->post('resetPayPassword', 'AuthenticateController@resetPayPassword')->name('api.authorization.resetPayPassword');
        $router->post('checkPayPassword', 'AuthenticateController@checkPayPassword')->name('api.authorization.checkPayPassword');


        $router->post('logout', 'AuthenticateController@logout')->name('api.authorizations.logout');
        $router->post('/user/userInfo', 'UserController@userInfo')->name('api.user.userInfo');
        $router->post('/user/update_avatar', 'UserController@update_avatar')->name('api.user.update_avatar');
        $router->post('/user/invite_code', 'UserController@invite_code')->name('api.user.invite_code');
        $router->post('/user/invite_share', 'UserController@invite_share')->name('api.user.invite_share');
        $router->post('/user/update_nickname ', 'UserController@update_nickname')->name('api.user.update_nickname');
        $router->post('/user/set_real ', 'UserController@set_real')->name('api.user.set_real');
        $router->post('/user/updatePersonalSignature ', 'UserController@updatePersonalSignature')->name('api.user.updatePersonalSignature');
        $router->post('/user/my', 'UserController@my')->name('api.user.my');
        $router->post('/user/update_info', 'UserController@update_info')->name('api.user.update_info');
        $router->post('/user/my_profit', 'UserController@my_profit')->name('api.user.my_profit');
        $router->post('{social_type}/bind_wechat', 'SocialController@bind_wechat')->name('api.social.bind_wechat'); //绑定微信
        $router->post('/user/myAddrList', 'UserController@myAddrList')->name('api.user.myAddrList');
        $router->post('/user/addAddr', 'UserController@addAddr')->name('api.user.addAddr');
        $router->post('/user/delAddr', 'UserController@delAddr')->name('api.user.delAddr');
        $router->post('/user/editAddr', 'UserController@editAddr')->name('api.user.editAddr');
        $router->post('/user/addrDetail', 'UserController@addrDetail')->name('api.user.addrDetail');
        $router->post('/user/setDefaultAddr', 'UserController@setDefaultAddr')->name('api.user.setDefaultAddr');

        $router->post('shareUrl', 'CommonController@shareUrl')->name('api.CommonController.shareUrl');

        //用户会员卡
        $router->post('/usercard/my_member_cards', 'UserCardController@my_member_cards')->name('api.UserCard.my_member_cards');
        $router->post('/usercard/use_member_card', 'UserCardController@use_member_card')->name('api.UserCard.use_member_card');
        $router->post('/usercard/use_member_card_no', 'UserCardController@use_member_card_no')->name('api.UserCard.use_member_card_no');
        $router->post('/usercard/presentCardList', 'UserCardController@presentCardList')->name('api.UserCard.presentCardList');
        $router->post('/usercard/presentCardDetail', 'UserCardController@presentCardDetail')->name('api.UserCard.presentCardDetail');
        $router->post('/usercard/buyPresentCard', 'UserCardController@buyPresentCard')->name('api.UserCard.buyPresentCard');
        $router->post('/usercard/myPresentList', 'UserCardController@myPresentList')->name('api.UserCard.myPresentList');
        $router->post('/usercard/exchangeButton', 'UserCardController@exchangeButton')->name('api.UserCard.exchangeButton');
        $router->post('/usercard/confirmButton', 'UserCardController@confirmButton')->name('api.UserCard.confirmButton');
        $router->post('/usercard/useCardLog', 'UserCardController@useCardLog')->name('api.UserCard.useCardLog');

        $router->post('updateSecurity', 'AuthenticateController@updateSecurity')->name('api.authorization.updateSecurity');
        $router->post('updatePassword', 'AuthenticateController@updatePassword')->name('api.authorization.updatePassword');
        $router->post('Shop/initiateCrowdFunding', 'ShopController@initiateCrowdFunding')->name('api.Shop.initiateCrowdFunding');
        $router->post('Shop/ShopKeeperCandidate', 'ShopController@ShopKeeperCandidate')->name('api.Shop.ShopKeeperCandidate');
        $router->post('Shop/modelCandidate', 'ShopController@modelCandidate')->name('api.Shop.modelCandidate');
        $router->post('Shop/staffCandidate', 'ShopController@staffCandidate')->name('api.Shop.staffCandidate');
        $router->post('Shop/applyStoreManager', 'ShopController@applyStoreManager')->name('api.Shop.applyStoreManager');
        $router->post('Shop/applyStoreModel', 'ShopController@applyStoreModel')->name('api.Shop.applyStoreModel');
        $router->post('Shop/applyStorestaff', 'ShopController@applyStorestaff')->name('api.Shop.applyStorestaff');
        $router->post('Shop/storeManagerDetails', 'ShopController@storeManagerDetails')->name('api.Shop.storeManagerDetails');
        $router->post('Shop/crowdFundingDetails', 'ShopController@crowdFundingDetails')->name('api.Shop.crowdFundingDetails');
        $router->post('Shop/completeCrowdFundingDetails', 'ShopController@completeCrowdFundingDetails')->name('api.Shop.completeCrowdFundingDetails');
        $router->post('Shop/shopManagerCandidate', 'ShopController@shopManagerCandidate')->name('api.Shop.shopManagerCandidate');
        $router->post('Shop/rentClothesConfirm', 'ShopController@rentClothesConfirm')->name('api.Shop.rentClothesConfirm');
        $router->post('Shop/returnClothesConfirm', 'ShopController@returnClothesConfirm')->name('api.Shop.returnClothesConfirm');
        $router->post('Shop/confirmReturnClothPage', 'ShopController@confirmReturnClothPage')->name('api.Shop.confirmReturnClothPage');
        $router->post('Shop/myRentclothPage', 'ShopController@myRentclothPage')->name('api.Shop.myRentclothPage');
        $router->post('Shop/confirmReturnClothNew', 'ShopController@confirmReturnClothNew')->name('api.Shop.confirmReturnClothNew');
        $router->post('Shop/myNotification', 'ShopController@myNotification')->name('api.Shop.myNotification');
        $router->post('Shop/myNotificationDetail', 'ShopController@myNotificationDetail')->name('api.Shop.myNotificationDetail');
        $router->post('Shop/shopProfit', 'ShopController@shopProfit')->name('api.Shop.shopProfit');
        $router->post('Shop/praise_shop_role', 'ShopController@praise_shop_role')->name('api.Shop.praise_shop_role');

        $router->post('Shop/returnCloth', 'ShopController@returnCloth')->name('api.Shop.returnCloth');
        $router->post('Shop/confirmReturnCloth', 'ShopController@confirmReturnCloth')->name('api.Shop.confirmReturnCloth');
        $router->post('Shop/rentClothes', 'ShopController@rentClothes')->name('api.Shop.rentClothes');
        $router->post('Shop/returnClothes', 'ShopController@returnClothes')->name('api.Shop.returnClothes');
        $router->post('Shop/rentRecord', 'ShopController@rentRecord')->name('api.Shop.rentRecord');
        $router->post('Shop/shopRentRecord', 'ShopController@shopRentRecord')->name('api.Shop.shopRentRecord');
        $router->post('Shop/shopRentRecordDetail', 'ShopController@shopRentRecordDetail')->name('api.Shop.shopRentRecordDetail');

        $router->post('user/myComputingPower', 'UserController@myComputingPower')->name('api.user.myComputingPower');
        $router->post('user/myEMoney', 'UserController@myEMoney')->name('api.user.myEMoney');
        $router->post('user/myWallet', 'UserController@myWallet')->name('api.user.myWallet');
        $router->post('user/myIncome', 'UserController@myIncome')->name('api.user.myIncome');
        $router->post('user/myShop', 'UserController@myShop')->name('api.user.myShop');
        $router->post('user/shop_profit', 'UserController@shop_profit')->name('api.user.shop_profit');
        $router->post('user/shop_profit_log', 'UserController@shop_profit_log')->name('api.user.shop_profit_log');

        $router->post('user/my_deal_log', 'UserController@my_deal_log')->name('api.user.my_deal_log');
        $router->post('user/my_member_card', 'UserController@my_member_card')->name('api.user.my_member_card');
        $router->post('user/noviceTask', 'UserController@noviceTask')->name('api.user.noviceTask');

        //租衣晒单相关
        $router->post('rentcloth/shop_index', 'RentClothController@shop_index')->name('api.RentCloth.shop_index'); //商家首页
        $router->post('rentcloth/rentClothes', 'RentClothController@rentClothes')->name('api.RentCloth.rentClothes'); //租衣页面
        $router->post('rentcloth/search_cloth', 'RentClothController@search_cloth')->name('api.RentCloth.search_cloth'); //租衣搜索
        $router->post('rentcloth/confirm_rent_cloth', 'RentClothController@confirm_rent_cloth')->name('api.RentCloth.confirm_rent_cloth'); //缺认租衣页面


        $router->post('rentcloth/add_rentcloth_post', 'RentClothController@add_rentcloth_post')->name('api.RentCloth.add_rentcloth_post'); //我要晒单
        $router->post('rentcloth/add_rentcloth_post_line', 'RentClothController@add_rentcloth_post_line')->name('api.RentCloth.add_rentcloth_post_line'); //我要晒单

        $router->post('rentcloth/rentcloth_post_list_login', 'RentClothController@rentcloth_post_list_login')->name('api.RentCloth.rentcloth_post_list_login'); //晒单列表
        $router->post('rentcloth/rentcloth_post_detail', 'RentClothController@rentcloth_post_detail')->name('api.RentCloth.rentcloth_post_detail'); //晒单详情
        $router->post('rentcloth/del_my_rentcloth_order', 'RentClothController@del_my_rentcloth_order')->name('api.RentCloth.del_my_rentcloth_order'); //删除晒单
        $router->post('rentcloth/praise_my_rentcloth_order', 'RentClothController@praise_my_rentcloth_order')->name('api.RentCloth.praise_my_rentcloth_order'); //晒单详情
        $router->post('rentcloth/rentcloth_post_share', 'RentClothController@rentcloth_post_share')->name('api.RentCloth.rentcloth_post_share'); //晒单分享
        $router->post('rentcloth/rentcloth_post_detail_lists', 'RentClothController@rentcloth_post_detail_lists')->name('api.RentCloth.rentcloth_post_detail_lists'); //所有晒单列表详情
        $router->post('rentcloth/payForBag', 'RentClothController@payForBag')->name('api.RentCloth.payForBag'); //所有晒单列表详情

        $router->post('Shop/my_shop_list', 'ShopController@my_shop_list')->name('api.Shop.my_shop_list');
        $router->post('Shop/my_shop_join_list', 'ShopController@my_shop_join_list')->name('api.Shop.my_shop_join_list');

        // 充值模块
        $router->post('recharge/recharge_to_wallet', 'RechargeController@recharge_to_wallet')->name('api.recharge.recharge_to_wallet');
        $router->post('recharge/recharge_to_member', 'RechargeController@recharge_to_member')->name('api.recharge.recharge_to_member');
        $router->post('recharge/renew_member', 'RechargeController@renew_member')->name('api.recharge.renew_member');
        $router->post('recharge/add_crowd', 'RechargeController@add_crowd')->name('api.recharge.add_crowd'); //项目认购
        $router->post('recharge/getCardDetail', 'RechargeController@getCardDetail')->name('api.recharge.getCardDetail'); //会员卡类型
        //提现模块
        $router->post('withdraw/add_withdraw', 'WithdrawController@add_withdraw')->name('api.withdraw.add_withdraw'); //提现申请
        $router->post('withdraw/add_shop_withdraw', 'WithdrawController@add_shop_withdraw')->name('api.withdraw.add_shop_withdraw'); //提现申请
        $router->post('withdraw/my_withdraw_list', 'WithdrawController@my_withdraw_list')->name('api.withdraw.my_withdraw_list'); //提现申请
        $router->post('withdraw/my_withdraw_list_shop', 'WithdrawController@my_withdraw_list_shop')->name('api.withdraw.my_withdraw_list_shop'); //提现申请
        $router->post('withdraw/refund', 'WithdrawController@refund')->name('api.withdraw.refund');
        $router->post('withdraw/refund_confirm', 'WithdrawController@refund_confirm')->name('api.withdraw.refund_confirm');

        // 交易模块
        $router->post('trade/sellPage', 'TradeController@sellPage')->name('api.trade.sellPage');
        $router->post('trade/buyPage', 'TradeController@buyPage')->name('api.trade.buyPage');

        $router->post('trade/dealList', 'TradeController@dealList')->name('api.trade.dealList');
        $router->post('trade/mySellList', 'TradeController@mySellList')->name('api.trade.mySellList');
        $router->post('trade/myBuyList', 'TradeController@myBuyList')->name('api.trade.myBuyList');
        $router->post('trade/delTradePage', 'TradeController@delTradePage')->name('api.trade.delTradePage');
        $router->post('trade/delTrade', 'TradeController@delTrade')->name('api.trade.delTrade');
        $router->post('trade/dealLine', 'TradeController@dealLine')->name('api.trade.dealLine');

        //线上店铺
        $router->post('shopline/brand_list', 'ShopLineController@brand_list')->name('api.shopline.brand_list');
        $router->post('shopline/goods_list', 'ShopLineController@goods_list')->name('api.shopline.goods_list');
        $router->post('shopline/searchGoodsPage', 'ShopLineController@searchGoodsPage')->name('api.shopline.searchGoodsPage');
        $router->post('shopline/delSearchLog', 'ShopLineController@delSearchLog')->name('api.shopline.delSearchLog');
        $router->post('shopline/SearchGoodsButton', 'ShopLineController@SearchGoodsButton')->name('api.shopline.SearchGoodsButton');
        $router->post('shopline/goods_detail', 'ShopLineController@goods_detail')->name('api.shopline.goods_detail');
        $router->post('shopline/myRobe', 'ShopLineController@myRobe')->name('api.shopline.myRobe');
        $router->post('shopline/addToRobeBorrow', 'ShopLineController@addToRobeBorrow')->name('api.shopline.addToRobeBorrow');
        $router->post('shopline/addToRobeBuy', 'ShopLineController@addToRobeBuy')->name('api.shopline.addToRobeBuy');
        $router->post('shopline/delRobe', 'ShopLineController@delRobe')->name('api.shopline.delRobe');
        $router->post('shopline/myOrderLineBorrow', 'ShopLineController@myOrderLineBorrow')->name('api.shopline.myOrderLineBorrow');
        $router->post('shopline/myOrderLineBuy', 'ShopLineController@myOrderLineBuy')->name('api.shopline.myOrderLineBuy');
        $router->post('shopline/myOrderLineBuyAfter', 'ShopLineController@myOrderLineBuyAfter')->name('api.shopline.myOrderLineBuyAfter');
        $router->post('shopline/orderLinedetail', 'ShopLineController@orderLinedetail')->name('api.shopline.orderLinedetail');
        $router->post('shopline/confirmOrder', 'ShopLineController@confirmOrder')->name('api.shopline.confirmOrder');
        $router->post('shopline/replyReturnOrder', 'ShopLineController@replyReturnOrder')->name('api.shopline.replyReturnOrder');
        $router->post('shopline/replyAfterOrder', 'ShopLineController@replyAfterOrder')->name('api.shopline.replyAfterOrder');

        $router->group(['middleware' => 'check.member'], function ($router) {
            $router->post('rentcloth/confirm_rent_cloth_button', 'RentClothController@confirm_rent_cloth_button')->name('api.RentCloth.confirm_rent_cloth_button'); //缺认租衣按钮
            $router->post('trade/buyTmc', 'TradeController@buyTmc')->name('api.trade.buyTmc');
            $router->post('trade/sellTmc', 'TradeController@sellTmc')->name('api.trade.sellTmc');
            $router->post('shopline/storeBuyOrder', 'ShopLineController@storeBuyOrder')->name('api.shopline.storeBuyOrder');
        });


        $router->post('noticeIndex', 'NotificationController@noticeIndex')->name('api.notification.noticeIndex');
        $router->post('publish', 'NotificationController@publish')->name('api.notification.publish');
        $router->post('notice', 'NotificationController@notice')->name('api.notification.notice');
        $router->post('flower', 'NotificationController@flower')->name('api.notification.flower');


    });
});
